<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page isELIgnored="false"%>
<link
	href="<c:url value="/resources/bootstrap/2.3.2/css/bootstrap.css" />"
	rel="stylesheet">
<link
	href="<c:url value="/resources/bootstrap/2.3.2/css/bootstrap-responsive.css" />"
	rel="stylesheet">

<title>欢迎来到家在曼城</title>
<style>
 	input[type='text'],input[type='password']{
		height: auto;
    }

</style>
</head>

<body>
	<div class="container-fluid">
		<div class="row-fluid">
			<h2>回复主题帖子</h2>
			<hr>
			<form class="form-horizontal" id="myform" method="post" action='<c:url value="/api/forum/post" />'>
				<div class="control-group">
					<label class="control-label" for="forumId">论坛id</label>
					<div class="controls">
						<input type="text" id="forumId" name="forumId" >
					</div>
				</div>
				<div class="control-group">
					<label class="control-label" for="topicId">主题id</label>
					<div class="controls">
						<input type="text" id="topicId" name="topicId" >
					</div>
				</div>
				<div class="control-group">
					<label class="control-label" for="message">内容</label>
					<div class="controls">
						<textarea rows="6" id="message" name="message"
										class="input-xxlarge"></textarea>
					</div>
				</div>
				<input type="hidden" name="anonymous" value="0">
				<div class="control-group">
					<div class="controls">
						<label class="checkbox"> <input type="checkbox" id="allowed" value="1">
							允许匿名
						</label>
					</div>
				</div>
				<div class="control-group">

					<div class="controls">
						<button class="btn btn-large btn-success" id="publishBtn"
							type="submit">回复</button>
					</div>

				</div>


			</form>
		</div>
	</div>
	<!--/row-->
</body>

<script src="<c:url value="/resources/jquery/1.9.1/jquery.min.js" />"></script>
<script src="<c:url value="/resources/bootstrap/2.3.2/js/bootstrap.min.js" />"></script>
<script type="text/javascript">
$(document).ready(function(){
	$("#allowed").change(function(){
		if($(this).prop('checked')){
			$("input[name='anonymous']").val("1");
		}else{
			$("input[name='anonymous']").val("0");
		}
	})
})
</script>